package com.bugpool.leilema.freamwork.satoken;

import cn.dev33.satoken.stp.StpInterface;
import com.bugpool.leilema.tc.bean.interfaces.UserConvert;
import com.bugpool.leilema.tc.service.MenuService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author wh
 * @Description
 * @Date 2023/3/2 10:00
 * @Version 1.0
 **/
@Component
public class StpInterfaceImpl implements StpInterface {


    @Resource
    private MenuService menuService;

    //获取权限集合
    @Override
    public List<String> getPermissionList(Object loginId, String loginType) {
        Set<String> set = menuService.getPermissions();
        return UserConvert.INSTANCE.setToList(set);
    }

    //获取角色集合
    @Override
    public List<String> getRoleList(Object loginId, String loginType) {
        return null;
    }
}
